<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
</head>
<body>
<!-- mvvm模式 -->
<!-- view -->
<div id="app">
    <h1 v-if="ok==true">{{message}}</h1>
    <h1 v-else>Not allowed</h1>

    <h1 v-if="type==='A'">{{message}}</h1>
    <h1 v-else-if="type==='B'">Not allowed</h1>
    <h1 v-else>C</h1>
</div>



<script>
    var vm = new Vue({//
        el:"#app",
        // model
        data:{
            type: 'A',
            ok: true,
            message: "hello,vue!"
        }
    })
</script>


</body>
</html>